<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="美国,欧美,游戏专线独享EB,socks5代理IP,proxy"/>
<meta name="description" content="socks5自由在线提取系统，出售包日EB，S5代理，包月独享专线，保证独享专线一个IP一个人使用，大量proxy" />
<title>新增新闻</title>
<style type="text/css">
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}

.STYLE1 {
	color: #e1e2e3;
	font-size: 12px;
}

.STYLE6 {
	color: #000000;
	font-size: 14px;
}

.STYLE10 {
	color: #000000;
	font-size: 12px;
}

.STYLE19 {
	color: #344b50;
	font-size: 12px;
}

.STYLE21 {
	font-size: 12px;
	color: #3b6375;
}

.STYLE22 {
	font-size: 12px;
	color: #295568;
}

.buylink{
	text-decoration: none;
	color: #000000;
}

.up{}

input.error { border: 1px solid red; }
</style>
		<script charset="utf-8" src="kindeditor-4.1.4/kindeditor-min.js"></script>
		<script charset="utf-8" src="kindeditor-4.1.4/lang/zh_CN.js"></script>
	<script>
	var editor;
	KindEditor.ready(function(K) {
		editor = K.create('textarea[name="content"]', {
			resizeType : 1,
			allowPreviewEmoticons : false,
			allowImageUpload : false,
			items : [
				'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
				'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
				'insertunorderedlist', '|', 'emoticons', 'image', 'link']
		});
	});
	function saveContext() {
		document.getElementById("msg").innerHTML="";
		var title = document.getElementById("title").value;
		if(title == '') {
			document.getElementById("msg").innerHTML="请输入新闻标题!";
			return;
		}
		if(editor.html() == '') {
			document.getElementById("msg").innerHTML="新闻内容不能为空!";
			return;
		}
		document.getElementById("context").value=editor.html();
		document.getElementById("addNewsForm").submit();
	}
		
		</script>
</head>

<body>
	<table width="100%" border="0" align="center" cellpadding="0"
		cellspacing="0">
		<tr>
			<td height="30"><table width="100%" border="0" cellspacing="0"
					cellpadding="0">
					<tr>
						<td height="24" bgcolor="#353c44"><table width="100%"
								border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td><table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
											<tr>
												<td height="19" align="center" width="100px" valign="bottom">
												</td>
											</tr>
										</table></td>
									<td>&nbsp;</td>
								</tr>
							</table></td>
					</tr>
				</table></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>

		<tr>
			<td>
				<form id="addNewsForm" action="<%=path%>/admin/saveAnn.do" method="post">
					<input type="hidden" name="ann.type" value="<s:property value="ann.type"/>"/>
					<input type="hidden" name="ann.id" value="<s:property value="ann.id"/>"/>
					<input id="context" type="hidden" name="ann.context" value="<s:property value="ann.context"/>"/>
				<table width="100%" border="0" cellpadding="0"
					cellspacing="1" bgcolor="#a8c7ce">
					<tr>
						<td width="20%" height="20" bgcolor="d3eaef" class="STYLE6"><div
								align="center">
							</div></td>
						<td width="60%" height="40" bgcolor="d3eaef" class="STYLE6"><div
								align="center">
								<h2>新增新闻</h2>
							</div></td>
						<td width="20%" height="20" bgcolor="d3eaef" class="STYLE6"><div
								align="center">
								<span class="STYLE10"></span>
							</div></td>
					</tr>
					<tr>
						<td width="20%" height="20" bgcolor="d3eaef" class="STYLE6"><div
								align="center">
							</div></td>
						<td width="60%" height="20" bgcolor="d3eaef" class="STYLE6"><div
								align="center">
								新闻名称:&nbsp;<input title="请输入15字以下的标题" id="title" maxlength="15" name="ann.title" value="<s:property value="ann.title"/>" style="width:89%"/>

							</div></td>
						<td width="20%" height="20" bgcolor="d3eaef" class="STYLE6"><div
								align="center">
								<span class="STYLE10"></span>
							</div></td>
					</tr>
					<tr>
						<td width="20%" height="20" bgcolor="d3eaef" class="STYLE6"><div
								align="center">
							</div></td>
						<td width="60%" height="20" bgcolor="d3eaef" class="STYLE6"><div
								align="center">
								<span class="STYLE10"><INPUT type="button" onclick="saveContext();"value="保存文档" /></span>
							</div></td>
						<td width="20%" height="20" bgcolor="d3eaef" class="STYLE6"><div
								align="center">
								<span class="STYLE10"></span>
							</div></td>
					</tr>
					<tr>
						<td width="20%" height="20" bgcolor="d3eaef" class="STYLE6"><div
								align="center">
							</div></td>
						<td width="60%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center">
								<h3>新闻内容</h3>
								<textarea name="content" style="width:700px;height:200px;visibility:hidden;"><s:property value="ann.context"/></textarea>
							</div></td>
						<td width="20%" height="20" bgcolor="d3eaef" class="STYLE6"><div
								align="center">
								<span id="msg" class="STYLE10" style="color:red"></span>
							</div></td>
					</tr>
				</table>
				</form>
				</td>
		</tr>
	</table>
</body>
</html>
